function createTime(ctimeMs){
    var date1 = new Date(ctimeMs); 
    var year = date1.getFullYear();
    var month = date1.getMonth() + 1;
    var day = date1.getDate();
    var hour = date1.getHours();
    var minute = date1.getMinutes();

    return year + "-" + month + "-" + day + "-" + hour + ":" + minute;
}

const fs = require("fs");
const path = require("path");

var filePath = path.join(__dirname, "/1.txt");

//获取文件属性信息
var fileObj = fs.statSync(filePath);
var ctimeMs = fileObj.ctimeMs;

// var data1 = new Date(ctimeMs);
// console.log(date1.getFullYear());

console.log(createTime(ctimeMs));